package com.eightbears.beboy.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.eightbears.beboy.R;
import com.eightbears.beboy.entity.ShopSellDataEntity;

public class ShopSelDataAdapter extends BaseQuickAdapter<ShopSellDataEntity.EachCoupon, BaseViewHolder> {

    public ShopSelDataAdapter() {
        super(R.layout.item_shop_data, null);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, ShopSellDataEntity.EachCoupon eachCoupon) {

        baseViewHolder.setText(R.id.tv_title, eachCoupon.getCoupon().getTitle())
                .setText(R.id.item_add_monty, String.format(mContext.getString(R.string.text_shop_data_add),
                        eachCoupon.getNum()))
                .setText(R.id.item_run_balance,  String.format(mContext.getString(R.string.text_price),
                        eachCoupon.getBalance()));
    }
}
